<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    我是子应用啊{{message}}
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  <script>

    ;(function(global){
      console.log('你好啊');
      console.log(window)
      var app = new Vue({
        el: '#app',
        data: {
          message: 'Hello Vue!'
        }
      });

      global.vue2 = {
        bootstrap: function() {
          console.log('子应用启动')
        },
        mount:  function() {
          console.log('mount')
        },
        unmount: function() {
          console.log('unmount')
        }
      }
    })(window)
  </script>
</body>
</html>